package day06_OOP.demo10_String;
//charAt(int index)
//返回char指定索引处的值
public class Demo01 {
    public static void main(String[] args) {
        String str="abdasdbadbasdhdasdba";
        int count=0;
        for (int i = 0; i <str.length() ; i++) {
            if ('a'==str.charAt(i));{
                count++;
            }
        }
        System.out.println(count);
    }
}
